//
//  NIBaseViewController.h
//  gweAD
//
//  Created by navinfo air on 2016/10/31.
//  Copyright © 2016年 mengy. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "LocalAuthentication/LAContext.h"
#import "NIToast.h"
#import "DeviceDefine.h"
#import "NILoadingView.h"
#import "ColorDefine.h"
#import "FontDefines.h"
#import "AlertTextDefines.h"
#import "CommonHeader.h"
#import <ReactiveObjC/ReactiveObjC.h>


#define HEIGHT_TABLECELL_DEFAULT ([self getScreenWidth]/8)

@interface NIBaseViewController : UIViewController
@property(nonatomic,assign)BOOL isForceLandscape;

/**
 设置初始值（页面传值）
 */
- (void)setValueForController;

/**
 返回相关
 */
- (void)back;
- (BOOL)backToClass:(Class)targetClass;
- (void)backFromTop;
- (void)backToClassFromTop:(Class)targetClass;
- (void)pushFromDown:(UIStoryboardSegue *)segue;
- (void)viewDidBack;
- (UIViewController *)findViewControllerWithClass:(Class)targetClass;
- (UIViewController *)findViewControllerAndBackWithClass:(Class)targetClass;

/**
 屏幕属性

 @return 屏幕宽
 */
- (CGFloat)getScreenWidth;
/**
 屏幕属性
 
 @return 屏幕高
 */
- (CGFloat)getScreenHeight;
/**
 屏幕属性
 
 @return 状态栏高度
 */
- (CGFloat)getStatusBarHeight;

- (void)onCancelActionClick;
- (void)onActionClick;
- (void)showAlert:(NSString *)title;
- (void)showToast:(NSString *)text;
- (void)showAlertWithActionTitle:(NSString *)title ActionTitle:(NSString *)aTitle;
- (void)showActionSheet:(NSArray *)array title:(NSString *)title destructiveIndex:(NSInteger)destructiveIndex actionTag:(NSInteger)tag;
- (void)showAlertWithActionTitle:(NSString *)title ActionTitle:(NSString *)aTitle cancelActionTitle:(NSString *)cancelTitle;

- (void)showAlertWithActionTitle:(NSString *)title ActionTitle:(NSString *)aTitle cancelActionTitle:(NSString *)cancelTitle tag:(NSInteger)tag;
- (void)onActionSheetSelect:(NSString *)text actionTag:(NSInteger)tag;
- (void)showActionSheet:(NSArray *)array title:(NSString *)title actionTag:(NSInteger)tag;
- (void)showDateActionSheet:(UIDatePickerMode)mode;

- (void)createCircleButton:(UIButton *)targetButton;
- (void)setValueAndUnitForLabel:(UILabel *)label valueForLabel:(NSString *)value unitForLabel:(NSString *)unit colorForValue:(UIColor *)vColor colorForUnit:(UIColor *)uColor fontForValue:(UIFont *)valueFont fontForUnit:(UIFont *)unitFont;
//- (void)uMengClick:(NSString *)eventID;
-(void)showMessageView : (NSString *)phone title : (NSString *)title body : (NSString *)body;
- (void)closeAlertController:(void (^ )(BOOL))completion;
- (void)showBackground;
-(void)toScanViewController;

#pragma mark - navigationBar
-(void)setTitle:(NSString *)title;
-(void)onClickBackButton;

-(void)setBackBtnWithImageName:(NSString *)imageName;

-(void)setRightBtn1WithImageName:(NSString *)imageName action:(SEL)action target:(id)target;
-(void)setRightBtn2WithImageName:(NSString *)imageName action:(SEL)action target:(id)target;
-(void)setRightBtn2WithTitle:(NSString *)title backgroundImageName:(NSString *)imageName action:(SEL)action target:(id)target;

-(void)setRightBtn1WithTitle:(NSString *)title backgroundImageName:(NSString *)imageName action:(SEL)action target:(id)target;


-(void)hiddenRightBtn1;

-(void)hiddenRightBtn2;

-(void)setRightBtn1Enable:(BOOL)enable;

-(void)setRightBtn2Enable:(BOOL)enable;

-(void)setBackBtnHidden:(BOOL)hidden;
@end
